import QtQuick 1.1
import com.nokia.meego 1.1
import StarMenu 1.0

Item {

    StarMenu {
        id: starMenu
        objectName: "Menu7-1"
        anchors.fill: parent
        starCenterVisible: true
        visualParent: main
        shape: StarMenu.ShapeLine
        startingRadius: 0
        radiusIncrement: 10
        startingAngle: 0
        center.x: main.width>>1
        center.y: main.height>>1

        onStarMenuOpening: {textRect.text =
           "<font size=4>Here StarMenu with a line shape.<br>"+
           "This shows how items are arranged while startingAngle changes<br>";
            textRect.z = starMenu.z;
        }

        Column {
            id: controls
            visible: starMenu.open
            x: main.width-controls.width
            y: main.height-controls.height
            z: main.z+1

            Row {
                Text {
                    text: "Starting Angle"
                    font {bold: true; pixelSize: 30}
                    color: "#ffffff"
                }
                Slider {
                    valueIndicatorVisible: true
                    minimumValue:0; maximumValue:360; width:550
                    stepSize: 1
                    Component.onCompleted: value = starMenu.startingAngle
                    onValueChanged: starMenu.startingAngle = value
                }
            }
            Row {
                Text {
                    text: "Radius increment"
                    font {bold: true; pixelSize: 30}
                    color: "#ffffff"
                }
                Slider {
                    valueIndicatorVisible: true
                    minimumValue:0; maximumValue:100; width:350
                    Component.onCompleted: value = starMenu.radiusIncrement
                    onValueChanged: starMenu.radiusIncrement = value
                }
            }
            Row {
                Text {
                    text: "Starting radius"
                    font {bold: true; pixelSize: 30}
                    color: "#ffffff"
                }
                Slider {
                    valueIndicatorVisible: true
                    minimumValue:-400; maximumValue:400; width:350
                    Component.onCompleted: value = starMenu.startingRadius
                    onValueChanged: starMenu.startingRadius = value
                }
            }
        }


        StarItem {
            width: 80; height: 40

            Rectangle {
                anchors.fill: parent; smooth: true
                color: "#3853d9"
                border.color: "#000000"; border.width: 1
            }
        }
        StarItem {
            width: 60; height: 60

            Rectangle {
                anchors.fill: parent; smooth: true
                color: "#ca3434"
                border.color: "#000000"; border.width: 1
            }
        }
        StarItem {
            width: 100; height: 30

            Rectangle {
                anchors.fill: parent; smooth: true
                color: "#8fad2a"
                border.color: "#000000"; border.width: 1
            }
        }

        StarItem {
            width: 120; height: 60

            Rectangle {
                anchors.fill: parent; smooth: true
                color: "#cbd11b"
                border.color: "#000000"; border.width: 1
            }
        }
        StarItem {
            width: 100; height: 100

            Rectangle {
                anchors.fill: parent; smooth: true
                color: "#28c5ca"
                border.color: "#000000"; border.width: 1
            }
        }
    }
}
